package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.system.domain.parm.SysCancelOrderFeeParm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCancelOrderFeeMapper;
import com.ruoyi.system.domain.SysCancelOrderFee;
import com.ruoyi.system.service.ISysCancelOrderFeeService;

/**
 * cancel_order_fee取消订单手续费Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-05
 */
@Service
public class SysCancelOrderFeeServiceImpl implements ISysCancelOrderFeeService 
{
    @Autowired
    private SysCancelOrderFeeMapper sysCancelOrderFeeMapper;

    /**
     * 查询cancel_order_fee取消订单手续费
     * 
     * @param id cancel_order_fee取消订单手续费主键
     * @return cancel_order_fee取消订单手续费
     */
    @Override
    public SysCancelOrderFee selectSysCancelOrderFeeById(String id)
    {
        return sysCancelOrderFeeMapper.selectSysCancelOrderFeeById(id);
    }

    @Override
    public List<SysCancelOrderFee> selectSysCancelOrderFeeByBusinessId(String businessId) {
        return sysCancelOrderFeeMapper.selectSysCancelOrderFeeByBusinessId(businessId);
    }

    /**
     * 查询cancel_order_fee取消订单手续费列表
     * 
     * @param sysCancelOrderFee cancel_order_fee取消订单手续费
     * @return cancel_order_fee取消订单手续费
     */
    @Override
    public List<SysCancelOrderFee> selectSysCancelOrderFeeList(SysCancelOrderFee sysCancelOrderFee)
    {
        return sysCancelOrderFeeMapper.selectSysCancelOrderFeeList(sysCancelOrderFee);
    }

    /**
     * 新增cancel_order_fee取消订单手续费
     * 
     * @param sysCancelOrderFee cancel_order_fee取消订单手续费
     * @return 结果
     */
    @Override
    public int insertSysCancelOrderFee(SysCancelOrderFee sysCancelOrderFee)
    {
        sysCancelOrderFee.setCreateTime(DateUtils.getNowDate());
        return sysCancelOrderFeeMapper.insertSysCancelOrderFee(sysCancelOrderFee);
    }

    /**
     * 修改cancel_order_fee取消订单手续费
     * 
     * @param sysCancelOrderFee cancel_order_fee取消订单手续费
     * @return 结果
     */
    @Override
    public int updateSysCancelOrderFee(SysCancelOrderFee sysCancelOrderFee)
    {
        sysCancelOrderFee.setUpdateTime(DateUtils.getNowDate());
        return sysCancelOrderFeeMapper.updateSysCancelOrderFee(sysCancelOrderFee);
    }

    /**
     * 批量删除cancel_order_fee取消订单手续费
     * 
     * @param ids 需要删除的cancel_order_fee取消订单手续费主键
     * @return 结果
     */
    @Override
    public int deleteSysCancelOrderFeeByIds(String[] ids,String businessId)
    {
        return sysCancelOrderFeeMapper.deleteSysCancelOrderFeeByIds(ids,businessId);
    }

    /**
     * 删除cancel_order_fee取消订单手续费信息
     * 
     * @param id cancel_order_fee取消订单手续费主键
     * @return 结果
     */
    @Override
    public int deleteSysCancelOrderFeeById(String id)
    {
        return sysCancelOrderFeeMapper.deleteSysCancelOrderFeeById(id);
    }
}
